package com.idTech.utils;

import org.lwjgl.util.vector.Vector3f;

import net.minecraft.entity.Entity;
import net.minecraft.entity.monster.EntitySkeleton;
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;

public class placePositionUtils 
{
	public static Vec3 placeInFrontOfEntity(Entity _entity, float meters )
	{
		Vec3 ret = Vec3.createVectorHelper(0,0,0);
		ret.xCoord = _entity.posX;
		ret.yCoord = _entity.posY;
		ret.zCoord = _entity.posZ;
		float yaw = _entity.rotationYaw - 90;
		ret.xCoord -= ((double)(MathHelper.cos(yaw/ 180.0F * (float)Math.PI))) * meters;
		ret.zCoord -= ((double)(MathHelper.sin(yaw/ 180.0F * (float)Math.PI))) * meters;
		return ret;
	}
}
